package wc.servicelet; /**
 * @ClassName:${NAME}
 * @Author: 鹿建文
 * @Date: 2022/4/9  - 14:51
 * @Describe:
 */

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(urlPatterns = "/logoutServlet")
public class LogoutServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        HttpSession session = request.getSession();
        session.setAttribute("admin",null);
        request.getRequestDispatcher("index.ftl").forward(request,response);
    }


}
